﻿using System;

[Serializable]
public class ModifyBase
{
    public bool m_bModify = false;
    public void MakeModify()
    {
        m_bModify = true;
    }
    public void ClearModify()
    {
        m_bModify = false;
    }

    public bool IsModify
    {
        get
        {
            return m_bModify;
        }
    }
}

public class SmartMoidfy : ModifyBase
{
    int m_nEvent;
    public void DoInit(int nEvent)
    {
        m_nEvent = nEvent;
    }
    public void DoUpdate()
    {
        if (IsModify)
        {
            SG.EventMgr.Instance().TriggerEvent(m_nEvent, null);
            ClearModify();
        }
    }
}
